<template>
  <v-btn class="mt-3 ml-3" @click="onTestClick">测试</v-btn>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import { GameType } from "@/model/GameType";

@Component({})
export default class Test extends Vue {
  // region Prop
  // endregion

  // region Data
  // endregion

  // region computed
  // endregion

  // region watch
  // endregion

  // region method
  onTestClick() {
    console.log("测试页面");
    this.$axios
      .get("api/HistoryInfos", {
        params: {
          name: 123
        }
      })
      .then(response => {
        console.log(response);
      })
      .catch(error => {
        console.log(error);
      });

    this.$axios
      .get("api/HistoryInfos/12233344433")
      .then(response => {
        console.log(response);
      })
      .catch(error => {
        console.log(error);
      });

    this.$axios
      .put("api/HistoryInfos", {
        data: {
          name: 123
        }
      })
      .then(response => {
        console.log(response);
      })
      .catch(error => {
        console.log(error);
      });

    this.$axios
      .post("api/HistoryInfos", {
        data: {
          Type: GameType.NumCompare
        }
      })
      .then(response => {
        console.log(response);
      })
      .catch(error => {
        console.log(error);
      });
  }
  // endregion

  // region hook
  // endregion
}
</script>

<style lang="scss"></style>
